$(function () {

    getReviewers({
        type: '预算内'
    });

    layui.use(['form'], function () {
        var form = layui.form();

        form.on('select(type)', function (data) {
            getReviewers({
                type: data.value
            })
        });

        form.on('select(currency)', function (data) {
            if (data.value == '美元') {
                $('.amount-item').addClass('sr-only');
            } else {
                $('.amount-item').removeClass('sr-only');
            }
        });

        // 监听金额变化
        $('.amount').bind('input propertychange', function (e) {
            var current_val = parseFloat($(this).val());
            if (current_val) {
                var uppercase_amount = Arabia_to_Chinese(current_val);
                $('.uppercase-amount').val(uppercase_amount);
            } else {
                $('.uppercase-amount').val('');
            }
        });

    });
});